<template>
  <div id="app">
    <!-- <img alt="Vue logo" src="./assets/logo.png"> -->
    <!-- <HelloWorld msg="Welcome to Your Vue.js App"/> -->
    <!-- 使用组件 -->
    <Home></Home>
    <Product></Product>
    	<button @click="destroy()">销毁方法</button>
  </div>
</template>

<script>
//引入组件
import Home from './components/Home.vue'
import Product from './components/Product.vue'
    import Bus from './evenBus.js'

export default {
  name: 'App',
  components: {
    /* 注册组件 */
    Home,
    Product
  },
  methods: {
    destroy () {
        Bus.$off("one")
    }
  }
}
</script>
<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
